// 隐藏和显示
var hide = document.querySelectorAll(".hide");
hide.forEach(function(val){
  val.addEventListener("click",function(){
    var hide_ul = val.nextElementSibling;
    var ul_li_height = parseInt(getComputedStyle(hide_ul.firstElementChild).height);
    var ul_li_count = hide_ul.childElementCount;
    if(window.getComputedStyle(hide_ul,null).getPropertyValue('height') == "0px") {
      hide_ul.style.height = `${ul_li_height*ul_li_count}px`;
      val.querySelector('span').innerText = "-";
    }else {
      hide_ul.style.height = "0px"
      val.querySelector('span').innerText = "+";
    }
  })
})
